package com.ting.rss;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.ting.rss.util.Init;
import com.ting.rss.util.Prop;

public class WelcomeActivity extends Activity implements AnimationListener{

//	private TextView thanks;
	private ImageView welcome;
	private Animation alphaAnimation;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.thanks);
		welcome = (ImageView) findViewById(R.id.welcome);
		
		alphaAnimation = AnimationUtils.loadAnimation(this, R.anim.welcome);
		alphaAnimation.setFillEnabled(true);
		alphaAnimation.setFillAfter(true);
		welcome.setAnimation(alphaAnimation);
		alphaAnimation.setAnimationListener(this);
		
		
		
	}
	@Override
	public void onAnimationEnd(Animation animation) {
		finish();
		Intent intent = new Intent();
		intent.setClass(this, RssActivity.class);
		startActivity(intent);
	}
	@Override
	public void onAnimationRepeat(Animation animation) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void onAnimationStart(Animation animation) {

		Init.init(this);
		
//		if(Prop.isInit()){
//			Init.init(this);
//		}
		
	}
}